﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace EmptoolWebApp.Entities
{
    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public class BaseTableEntity : Microsoft.WindowsAzure.Storage.Table.TableEntity
    {
        /// <summary>
        /// 
        /// </summary>
        public const string DEFAULT_OWNER = "SYSTEM";

        public BaseTableEntity()
        {
            this.RowKey = string.Empty;
            this.Owner = DEFAULT_OWNER;
            this.Creator = DEFAULT_OWNER;
            this.CreationDateTime = DateTime.UtcNow;
        }

        [DataMember]
        public string Owner { get; set; }

        [DataMember]
        public string Creator { get; set; }

        [DataMember]
        public DateTime CreationDateTime { get; set; }

        [DataMember]
        public string Revisor { get; set; }

        [DataMember]
        public DateTime? RevisionDateTime { get; set; }
    }
}